//
//  UILabel+STLabel.m
//  OCVVeibo
//
//  Created by leergou on 16/7/24.
//  Copyright © 2016年 WhiteHouse. All rights reserved.
//

#import "UILabel+STLabel.h"

@implementation UILabel (STLabel)

//init(textColor: UIColor, textFont:CGFloat, maxWidth: CGFloat = 0) {
//    self.init()
//    self.textColor = textColor
//    self.font = UIFont.systemFontOfSize(textFont)
//    
//    if maxWidth > 0 {
//        // 设置label显示的最大宽度
//        self.preferredMaxLayoutWidth = maxWidth
//        self.numberOfLines = 0
//    }

- (instancetype)initWithTextColor:(UIColor *)textColor textFont:(CGFloat)font maxWidth:(CGFloat)maxWidth{
    
    if (self = [super init]) {
        
        self.textColor = textColor;
        self.font = [UIFont systemFontOfSize:font];
        if (maxWidth > 0) {
            
            self.preferredMaxLayoutWidth = maxWidth;
            self.numberOfLines = 0;
        }
        
    }
    return self;
}



@end
